Added makefile.targets for `make install` and `make uninstall`, upd readme.md
authorJeroen van der Heijden <jeroen@transceptor.technology>
Thu, 14 Mar 2019 09:00:23 +0000 (10:00 +0100)
committerJeroen van der Heijden <jeroen@transceptor.technology>
Thu, 14 Mar 2019 09:00:23 +0000 (10:00 +0100)
Debug/makefile
README.md
Release/makefile
makefile.targets [new file with mode: 0644]

index 49e7070f4b4dde88c3de52f096f60966a38a7bb7..7f8404304db2a7e3c56e6a7d0fb5f7429c0df5a8 100644 (file)
@@ -52,9 +52,11 @@ OS := $(shell uname)
 ifeq ($(OS),Darwin)
 CRYPT :=
 UUID :=
+INSTALL_PATH := /usr/local
 else
 CRYPT := -lcrypt
 UUID := -luuid
+INSTALL_PATH := /usr
 endif
 
 # Add inputs and outputs from these tool invocations to the build variables
index 1f02b937c6b745d2446720b204be0841144534c8..54450e7eec5dad2f80e4ead427b65efb2d4e8dc6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -58,6 +58,11 @@ make test
 make
 ```
 
+Install
+```
+sudo make install
+```
+
 #### OSX
 >Make sure [libcleri](https://github.com/transceptor-technology/libcleri) is installed!
 
@@ -77,6 +82,11 @@ make test
 make
 ```
 
+Install
+```
+sudo make install
+```
+
 #### Configuration
 SiriDB requires a configuration file to run. By default SiriDB will search for the configuration file in `/etc/siridb/siridb.conf` but alternatively you can specify a custom path by using the `-c/--config` argument.
 
index fc01f5314b46d9ed521047fe2801f49b89b1f33e..02df6688bb17d5ea88bfa1b79b3fe17148b465f1 100644 (file)
@@ -52,9 +52,11 @@ OS := $(shell uname)
 ifeq ($(OS),Darwin)
 CRYPT :=
 UUID :=
+INSTALL_PATH := /usr/local
 else
 CRYPT := -lcrypt
 UUID := -luuid
+INSTALL_PATH := /usr
 endif
 
 # Add inputs and outputs from these tool invocations to the build variables
diff --git a/makefile.targets b/makefile.targets
new file mode 100644 (file)
index 0000000..b357e0b
--- /dev/null
@@ -0,0 +1,11 @@
+.PHONY: install
+install:
+       @mkdir -p /etc/siridb/
+       @mkdir -p /var/lib/siridb/
+       @cp -n ../siridb.conf /etc/siridb/siridb.conf
+       @cp siridb-server $(INSTALL_PATH)/bin/siridb-server
+
+
+.PHONY: uninstall
+uninstall:
+       @rm -f $(INSTALL_PATH)/bin/siridb-server